This invention relates to the field of computer systems. More particularly, in a media streaming system in which a track of media has associated metadata that provides timing, offset and other information, an apparatus and methods are provided for streaming a media track to multiple clients with just one copy of the track metadata.
Media streaming systems are designed to stream media programs and events, which may be pre-recorded or live, to client devices (e.g., computers, media players). A client can play a media stream as it is received (i.e., before the stream is complete), thereby allowing fast, or even real-time, enjoyment of the media program or event.
Streamed media is often composed of multiple tracks. For example, an audiovisual program generally includes at least one audio track and at least one video track. Each track includes media of the appropriate type (e.g., audio, video), and may also include metadata that is used to stream the media correctly. A track's metadata may include information for identifying a media segment or sample (or other unit of media) that should be played for a given time index within the program, for determining where that segment or sample is located in the file, etc. A media track's metadata may thus be used by a media streaming server to stream the media track in the correct sequence, with appropriate timing, and so on.
When streaming a media track or program to multiple clients, existing systems usually store separate copies of each track's metadata for each client. More specifically, from a media file containing the media to be streamed, these systems repeatedly extract and store the metadata each time a new client requests the media. When serving a large number of clients, this could require a significant amount of the server's resources (e.g., memory, processor, disk usage), and may limit the number of clients the server can support.
Also, some existing systems typically allocate just one file descriptor, to be shared among all clients receiving a particular media stream, for accessing the media file containing the media being streamed. This can lead to a great deal of contention among the client streams as each one attempts to seek to (i.e., find) and extract a different media segment or sample.
Yet further, when streaming a multi-track media program to a client, existing media streaming systems attempt to maintain synchronization between the tracks so that the appropriate corresponding track media is streamed or played for each time unit of the program, but may be incapable of regaining synchronization if it is lost. For example, if the media for one track is received (e.g., from a storage device) at a slower rate than the media for another track, an existing media streaming system may simply continue streaming the media, even if the tracks get further and further out of synchronization. Other systems may simply halt a media stream if synchronization is lost, without attempting to correct the situation.